<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>15列表循环</title>
<style>
  li{
    width: 500px;
    height: 50px;
    line-height: 50px;
    background-color: lightcoral;
    margin-top: 10px;
    padding-left: 10px;
  }
</style>
</head>
<body>

  <div id='app'>
    <ul>
      <li v-for="item in arr">{{item}}</li>
    </ul>
    <hr>
    <ul>
      <li v-for="(item, index) in arr">
        {{index}}
        =>
        {{item}}
      </li>
    </ul>
    <hr>
    <ul>
      <li v-for="item in obj">
        {{item}}
      </li>
    </ul>
    <hr>
    <ul>
      <li v-for="(item, key) in obj">
        {{key}}
        =>
        {{item}}
      </li>
    </ul>
    <hr>
    <ul>
      <li v-for="(item, key, index) in obj">
        {{key}}
        =>
        {{item}}
        =>
        {{index}}
      </li>
    </ul>
  </div>

<script src='https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js'></script>
<script>
  const app = new Vue({
    el: '#app'
    ,data:{
      arr: ['蜘蛛精','玉兔精','黑熊怪','小旋风']
      ,obj:{
        name: '小明'
        ,gender: '男'
        ,age: 18
      }
    }
  })
</script>
</body>
</html>